module(
    name = "verible",
)

bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "bazel_skylib", version = "1.5.0")

bazel_dep(name = "rules_license", version = "0.0.8")
bazel_dep(name = "rules_proto", version = "6.0.0-rc2")
bazel_dep(name = "rules_cc", version = "0.0.9")

# Register m4 rules and toolchain.
bazel_dep(name = "rules_m4", version = "0.2.3")
m4 = use_extension(
    "@rules_m4//m4/extensions:m4_repository_ext.bzl",
    "m4_repository_ext",
)
m4.repository(
    name = "m4",
    version = "1.4.18",
    extra_copts = ["-O3"],
)
use_repo(m4, "m4")
register_toolchains("@m4//:toolchain")

# Register bison rules and toolchain.
bazel_dep(name = "rules_bison", version = "0.2.2")
bison = use_extension(
    "@rules_bison//bison/extensions:bison_repository_ext.bzl",
    "bison_repository_ext",
)
bison.repository(
    name = "bison",
    version = "3.3.2",
    extra_copts = ["-O3"],
)
use_repo(bison, "bison")
register_toolchains("@bison//:toolchain")

# Register flex rules and toolchain.
bazel_dep(name = "rules_flex", version = "0.2.1")
flex = use_extension(
    "@rules_flex//flex/extensions:flex_repository_ext.bzl",
    "flex_repository_ext",
)
flex.repository(
    name = "flex",
    version = "2.6.4",
    extra_copts = ["-O3"],
)
use_repo(flex, "flex")
register_toolchains("@flex//:toolchain")

bazel_dep(name = "abseil-cpp", version = "20240116.2", repo_name="com_google_absl")
single_version_override(
    module_name = "abseil-cpp",
    patch_strip = 1,
    version = "20240116.2",
    patches = ["//bazel:absl.patch"],
)

bazel_dep(name = "re2", version = "2023-09-01", repo_name="com_googlesource_code_re2")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name="com_google_googletest")
bazel_dep(name = "protobuf", version = "26.0", repo_name="com_google_protobuf")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name="jsonhpp")
bazel_dep(name = "zlib", version = "1.3.1")
